package cnt5106.p2p.peer.peerhandler;

import java.io.IOException;
import java.net.DatagramSocket;
import java.net.ServerSocket;
//import java.util.HashMap;
//import java.util.Map;

import cnt5106.p2p.peer.filesystem.FileControler;


public class ToPeerHandler 
{
	private int tcpSevPort = -1;
	private int udpSevPort = -1;
	
	//private static Map<String, FileControler> fileList = new HashMap<String, FileControler>();
	@SuppressWarnings("unused")
	private ServerSocket serverTCP = null;  // initialized in constructor
    @SuppressWarnings("unused")
	private DatagramSocket severUDP = null;
    //private DatagramSocket clientUDP = null;
    private FileControler fileCnl= null;
    @SuppressWarnings("unused")
	private MessageHandler msgHdl = null;
    
    public ToPeerHandler(String fname, long fsize, int tcpPort, int udpSevPort) throws IOException
    {
    	this.tcpSevPort = tcpPort;
    	this.udpSevPort = udpSevPort;
    	
    	this.fileCnl = new FileControler(fname, fsize);
    	this.msgHdl = new MessageHandler(fileCnl, this.tcpSevPort);
    	this.serverTCP = new ServerSocket(this.tcpSevPort);
    	this.severUDP = new DatagramSocket(this.udpSevPort);
    }
    
    
    
    
}
